using System;
using System.Xml.Serialization;
using System.Collections.Generic;
using System.Text;

namespace Bots
{
    public enum DomainOperateType { 
        /// <summary>
        /// read only
        /// </summary>
        Reading = 1,
        /// <summary>
        /// allow to edit or delete operate
        /// </summary>
        Edit = 2,
    }

    [Serializable]
    public class DomainSet : ResultObject
    {
        private DomainObject[] dos;
        private int hits;
        private double elapseTime = 0;

        public DomainSet() {
        }
        
        public DomainSet(DomainObject[] domainObjects, int hits) {
            this.dos = domainObjects;
            this.hits = hits;
        }

        /// <summary>
        /// Error information output
        /// </summary>
        /// <param name="ex"></param>
        public DomainSet(Exception ex):base(ex) {
        }

        [XmlArrayAttribute()]        
        public DomainObject[] DomainObjects {
            get { return this.dos; }
            set { this.dos = value; }
        }

        public double ElapseTime {
            get { return this.elapseTime; }
            set { this.elapseTime = value; }
        }

        public int Hits {
            get { return this.hits; }
            set { this.hits = value; }
        }
    }
}
